(vox_configure): Set volume for left and right channel.
authorGerd Moellmann <gerd@gnu.org>
Wed, 6 Dec 2000 13:31:48 +0000 (13:31 +0000)
committerGerd Moellmann <gerd@gnu.org>
Wed, 6 Dec 2000 13:31:48 +0000 (13:31 +0000)
(sound_cleanup): Return nil.

src/sound.c

index 521f1fdce68832fe912760db5c77e2ed23bdd2b3..fc3adbdba6b3b29c58c9eb83fad19fc4b0b2e593 100644 (file)
@@ -360,6 +360,8 @@ sound_cleanup (arg)
       if (current_sound->fd > 0)
        emacs_close (current_sound->fd);
     }
+
+  return Qnil;
 }
 
 
@@ -787,9 +789,13 @@ vox_configure (sd)
       && ioctl (sd->fd, SNDCTL_DSP_STEREO, &sd->channels) < 0)
     sound_perror ("Setting channels");
 
-  if (sd->volume > 0
-      && ioctl (sd->fd, SOUND_MIXER_WRITE_PCM, &sd->volume) < 0)
-    sound_perror ("Setting volume");
+  if (sd->volume > 0)
+    {
+      int volume = sd->volume & 0xff;
+      volume |= volume << 8;
+      if (ioctl (sd->fd, SOUND_MIXER_WRITE_PCM, &volume) < 0)
+       sound_perror ("Setting volume");
+    }
 }